﻿@page "/post/{year:int:length(4)}/{month:int:range(1,12)?}"
@model Moonglade.Web.Pages.ArchiveListModel
@{
    ViewBag.TitlePrefix = $"Posts in {Model.ArchiveInfo}";
    ViewBag.BodyClass = "body-archive-list bg-gray-1";
}

<h2 class="page-heading mb-4">
    @ViewBag.TitlePrefix
</h2>

<div>
    @if (!Model.Posts.Any())
    {
        <div class="text-muted text-center">
            - @SharedLocalizer["No Posts"] -
        </div>
    }
    else
    {
        foreach (var item in Model.Posts.OrderByDescending(s => s.PubDateUtc))
        {
            <partial name="_PostListEntry" model="item" />
        }
    }
</div>
